<div class="activitytemplates index">
    <h2><?php __('Activity Templates'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('Name','name'); ?></th>
            <th><?php echo $this->Paginator->sort('Text','text'); ?></th>
            <th><?php echo $this->Paginator->sort('Created','created'); ?></th>
            <th><?php echo $this->Paginator->sort('Modified','modified'); ?></th>
            <th class="actions"><?php __('Actions'); ?></th>
        </tr>
        <?php
        $i = 0;
        foreach($activitytemplates as $activitytemplate):
            $class = null;
            if( $i++ % 2 == 0 )
            {
                $class = ' class="altrow"';
            }
        ?>
            <tr<?php echo $class; ?>>
                <td><?php echo $activitytemplate['Activitytemplate']['name']; ?>&nbsp;</td>
                <td><?php echo $activitytemplate['Activitytemplate']['text']; ?>&nbsp;</td>
                <td><?php echo $activitytemplate['Activitytemplate']['created']; ?>&nbsp;</td>
                <td><?php echo $activitytemplate['Activitytemplate']['modified']; ?>&nbsp;</td>
                <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('action' => 'view', $activitytemplate['Activitytemplate']['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $activitytemplate['Activitytemplate']['id'])); ?>
                <?php
                if( $this->Session->read('Auth.Employee.id') == Configure::read('employeetype.admin.id') )
                {
                    echo $this->Html->link(__('Delete', true), array('action' => 'delete', $activitytemplate['Activitytemplate']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $activitytemplate['Activitytemplate']['id']));
                }
                ?>
            </td>
        </tr>
<?php endforeach; ?>
            </table>
            <p>
        <?php
                echo $this->Paginator->counter(array(
                    'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
                ));
        ?>	</p>

            <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
        	 | 	<?php echo $this->Paginator->numbers(); ?>
                |
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>